package com.neutech.maplestory.entity;

import com.neutech.maplestory.client.MapleStoryClient;
import com.neutech.maplestory.util.ImageUtil;

import java.awt.*;

public class Ground extends AbstractMapleObject{
    public Image img;
    public Ground(){}
    public Ground(MapleStoryClient msc,int x, int y,int width,int height){
       this.msc = msc;
       this.x = x;
       this.y = y;
       this.width = width;
       this.height = height;

       /*this.img = ImageUtil.getImage();
       this.width = img.getWidth(null);
       this.height = img.getHeight(null);*/
    }
    public Ground(MapleStoryClient msc,int x, int y,String key){
        this.msc = msc;
        this.x = x;
        this.y = y;

       this.img = ImageUtil.getImage(key);
       this.width = img.getWidth(null);
       this.height = img.getHeight(null);
    }

     @Override
     public void draw(Graphics g) {
        g.drawRect(x,y,width,height);
    }
    public void bg1 (Graphics g){
        x +=1;
        g.drawImage(img,x,y,null);
        while (x>=0){
            x = -800;
        }
    }
}
